home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Conversion / Convert_PICT / Convert PICT.app / UncommentedPSCode / Patterns < prev    next >
Text File  |  1994-05-24  |  1KB  |  73 lines

  1. %BEGIN Patterns
  2. /GetPatGrey
  3. {
  4.     /QDpattern exch def
  5.     /darkness 0 def
  6.     0 1 7
  7.     {
  8.         /patByte exch def
  9.         /darkness
  10.             QDpattern patByte get
  11.             255 div darkness add
  12.         def
  13.     }
  14.     for
  15.     darkness 8 div
  16. }
  17. def
  18. /FillQDPatDict
  19. {
  20.     begin
  21.         /QDPatType exch def
  22.         QDPatType 0 eq
  23.         {
  24.             /QDPatData exch def
  25.             /QDPatGrey QDPatData GetPatGrey def
  26.         }
  27.         {
  28.             QDPatType 2 eq
  29.             {
  30.                 /QDColorValue exch def
  31.                 pop % B&W pattern not needed. color will suffice.
  32.             }
  33.             {
  34.                 /QDPatBitmap exch def
  35.                 /QDisPacked exch def
  36.                 /QDDestHeight exch def
  37.                 /QDDestWidth exch def
  38.                 /Height exch def
  39.                 /Width exch def
  40.                 /QDTop exch def
  41.                 /QDLeft exch def
  42.                 /BitsPerComponent exch def
  43.                 /QDColorTable exch def
  44.                 /QDNumColors exch def
  45.                 /QDPatData exch def
  46.                 /QDPatGrey QDPatData GetPatGrey def
  47.             }
  48.             ifelse
  49.         }
  50.         ifelse
  51.     end
  52. }
  53. def
  54. /bkPat
  55.     {backPattern FillQDPatDict}
  56. def
  57. /pnPat
  58.     {penPattern FillQDPatDict}
  59. def
  60. /fillPat
  61.     {fillPattern FillQDPatDict}
  62. def
  63. /bkPixPat
  64.     {backPattern FillQDPatDict}
  65. def
  66. /pnPixPat
  67.     {penPattern FillQDPatDict}
  68. def
  69. /fillPixPat
  70.     {fillPattern FillQDPatDict}
  71. def
  72. %END Patterns
  73.